from wifi_interface import *
from shop import *
from kivy.lang import Builder
from kivymd.app import MDApp
from kivy.uix.screenmanager import Screen, ScreenManager

class MainNavigationScreen(Screen):
    pass

class MainApp(MDApp):
    def build(self): 
        Builder.load_file('1_shop.kv')
        Builder.load_file('3_wifi.kv')
        Builder.load_file('1_main.kv')
        scm=ScreenManager()
        scm.add_widget(MainNavigationScreen(name='scrMain'))
        scm.add_widget(ShopItemScreen(name='scrItem'))
        scm.add_widget(FinalScreen(name='scrFinal'))
        scm.add_widget(CheckOutScreen(name='scrChkOut'))
        print(scm)
        return scm

    def on_start(self):
        self.root.get_screen('scrMain').ids.wifiItem.linkStatus()
        #self.root.get_screen('scrMain').ids.tabShop.add_widget(TabShopIngredients())
        #self.root.get_screen('scrMain').ids.tabShop.add_widget(TabShopDevices())




if __name__ == '__main__':
    iGEM_Main=MainApp()
    iGEM_Main.run()